import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Range {
    List<String>  set;
    List<String> NtimeRangePlayer;
    List<String> NstepRangePlayer;
    List<Integer> NtimeRange;
    List<Integer> NstepRange;
    List<String> HtimeRangePlayer;
    List<String> HstepRangePlayer;
    List<Integer> HtimeRange;
    List<Integer> HstepRange;
    Range() throws IOException {
        String line[] = null;
        String lineread = null;
        set = new ArrayList<>();
        NtimeRangePlayer = new ArrayList<>();
        NstepRangePlayer = new ArrayList<>();
        NtimeRange = new ArrayList<>();
        NstepRange = new ArrayList<>();
        HtimeRangePlayer = new ArrayList<>();
        HstepRangePlayer = new ArrayList<>();
        HtimeRange = new ArrayList<>();
        HstepRange = new ArrayList<>();
        BufferedReader Ntimebr = new BufferedReader(new FileReader("NtimeRange.txt"));
        BufferedReader Nstepbr = new BufferedReader(new FileReader("NstepRange.txt"));
        BufferedReader Htimebr = new BufferedReader(new FileReader("HtimeRange.txt"));
        BufferedReader Hstepbr = new BufferedReader(new FileReader("HstepRange.txt"));
        BufferedReader setbr = new BufferedReader(new FileReader("set.txt"));
        while ((lineread = Ntimebr.readLine()) != null) {
            line=lineread.split(" ");
            NtimeRangePlayer.add(line[0]);
            NtimeRange.add(Integer.parseInt(line[1]));
        }
        while ((lineread = Nstepbr.readLine()) != null) {
            line=lineread.split(" ");
            NstepRangePlayer.add(line[0]);
            NstepRange.add(Integer.parseInt(line[1]));
        }
        while ((lineread = Htimebr.readLine()) != null) {
            line=lineread.split(" ");
            HtimeRangePlayer.add(line[0]);
            HtimeRange.add(Integer.parseInt(line[1]));
        }
        while ((lineread = Hstepbr.readLine()) != null) {
            line=lineread.split(" ");
            HstepRangePlayer.add(line[0]);
            HstepRange.add(Integer.parseInt(line[1]));
        }
        while ((lineread = setbr.readLine()) != null) {
            set.add(lineread);
        }
    }
}